package com.lp.common.poster.entity;

import com.lp.common.poster.annotation.PosterBackground;
import com.lp.common.poster.annotation.PosterFontCss;
import com.lp.common.poster.annotation.PosterImageCss;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.awt.*;
import java.awt.image.BufferedImage;

import static com.lp.common.constant.CategoryConstant.CODE_FAMOUS_REMARK;

/**
 * @program: biz
 * @description: 名人名言海报
 * @author: Ke.Song
 * @since: 2024-04-03 22:02:05
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class FamousRemPoster extends BasePoster {

    /**
     * 背景图
     */
    @PosterBackground(width = 933, height = 1224)
    private BufferedImage backgroundImage;

    /**
     * 作者
     */
    @PosterFontCss(position = {800, 780}, color = {51, 51, 51}, size = 45, canNewLine = {0, 835, 0}, type = "Author",
            style = Font.BOLD)
    private String author;

    /**
     * 内容
     */
    @PosterFontCss(position = {94, 350}, color = {51, 51, 51}, canNewLine = {1, 705, 4}, size = 45,
            type = CODE_FAMOUS_REMARK, lineHeight = 1.7)
    private String content;

    /**
     * 二维码
     */
    @PosterImageCss(position = {657, 976}, width = 193, height = 193)
    private BufferedImage qrCode;
}
